package de.baumann.browser.present

import de.baumann.browser.api.OdinObserver
import de.baumann.browser.base.BasePresenter
import de.baumann.browser.iview.IFeedbackView
import de.baumann.browser.model.UserModel

class FeedbackPresenter : BasePresenter<IFeedbackView>() {
    fun feedback() {
        UserModel().feedback(view.content)
                .subscribe(object : OdinObserver<Any>(view) {
                    override fun onSuccess(data: Any?) {
                        if (view != null)
                            view.feedbackSuccess()
                    }
                })
    }

}